#pragma once

#include "../umlmodel_global.h"

#include <memory>
#include <vector>

#include "Interval.h"

using std::make_shared;
using std::shared_ptr;
using std::vector;

namespace uml {
class Duration;

/// <summary>
/// DurationInterval
/// A DurationInterval defines the range between two Durations.
/// </summary>
class UMLMODEL_EXPORT DurationInterval : public Interval {

public: // Constructors and destructors
    explicit DurationInterval(const QString& umlType="uml::DurationInterval");

public: // JsonSerializable override
    void fromJson(const QJsonObject& json, QStringList& errorList) override;
    void toJson(QJsonObject& json) override;

public: // Properties
    /// <summary>
    /// max getter
    /// Refers to the Duration denoting the maximum value of the range.
    /// </summary>
    shared_ptr<Duration> max() const;

    /// <summary>
    /// max setter
    /// Refers to the Duration denoting the maximum value of the range.
    /// </summary>
    void setMax(shared_ptr<Duration> value);

    /// <summary>
    /// min getter
    /// Refers to the Duration denoting the minimum value of the range.
    /// </summary>
    shared_ptr<Duration> min() const;

    /// <summary>
    /// min setter
    /// Refers to the Duration denoting the minimum value of the range.
    /// </summary>
    void setMin(shared_ptr<Duration> value);

private: // Fields
    /// <summary>
    /// max
    /// Refers to the Duration denoting the maximum value of the range.
    /// </summary>
    shared_ptr<Duration> max_;

    /// <summary>
    /// min
    /// Refers to the Duration denoting the minimum value of the range.
    /// </summary>
    shared_ptr<Duration> min_;

};

} // namespace uml
